# 缩进

magicians = ['alice', 'david', 'carolina'];

magicians.sort()
print(magicians)

# 遍历
for magician in magicians:
    print(f"{magician.title()}, that was a great trick.");
print(f"i can't wait to  see your next trick, {magician.title()}. \n")

a = range(1,6)
print(a)

squares = []
for value in range(1, 11):
    square = value ** 2
    squares.append(square)

print(squares)

# 列表推导式
squares = [value**2 for value in range(1,11)]
print(squares)

# 切片
players = ['charles', 'martina', 'michael', 'florence', 'eli'];
print(players[1:4])

# 复制列表
my_foods = ['pizza', 'falafel', 'carrot cake']
friend_foods = my_foods[:]
my_foods.append("test")
print(friend_foods)

friend_foods = my_foods
print(friend_foods)

# 元组
dimensions = (200, 50)
# dimensions[0] = 100
for dim in dimensions:
    print(dim)












